#pragma once
#include "fxcc/core/BaseLoader.h"
#include "fxcc/core/graph/common/GraphImpl.h"
#include "fxcc/core/graph/common/Maps.h"

struct ModelLoader :public BaseLoader
{
	static std::unordered_map<std::string, std::shared_ptr<fxcc::graph::common::MeshJack>> m_MeshJacks;
	
	static std::unordered_map<std::string, std::shared_ptr<fxcc::graph::common::MeshJack>> m_SkinnedMeshJacks;

	static std::unordered_map<std::string, std::shared_ptr<fxcc::graph::common::Animation>> m_Animations;

	static std::unordered_map<std::string, std::shared_ptr<fxcc::graph::common::MaterialData>> m_MaterialNativeDatas;

	static std::unordered_map<std::string, std::shared_ptr<fxcc::graph::common::MaterialView>> m_Materials;

	static std::unordered_map<std::string, std::shared_ptr<fxcc::graph::common::Bones>> m_Boness;

	bool LoadFile(const fxcc::File& file);
	
	std::shared_ptr<fxcc::graph::common::MeshJack> LoadMeshFile(const std::string& file);

	std::shared_ptr<fxcc::graph::common::MeshJack> LoadSkinnedFile(const std::string& file);

	std::shared_ptr<fxcc::graph::common::Animation> LoadAnimation(const std::string& file);

	std::shared_ptr<fxcc::graph::common::Bones> LoadBones(const std::string& file);

	std::shared_ptr<fxcc::graph::common::MaterialView> LoadMaterial(const std::string& file);

	std::shared_ptr<fxcc::graph::common::MaterialData> LoadMaterialNativeData(const std::string& file);

};